package com.tenebrous.jestic.mapper.idao.server;


import com.tenebrous.jestic.entity.server.JesticServer;
import com.tenebrous.jestic.mapper.ISuperMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

//@Mapper
public interface JesticServerMapper extends ISuperMapper<JesticServer> {

    @Select("select * from jestic_server WHERE SERVER_NAME = #{serverName}")
    List<JesticServer> selectByName(String serverName);

    @Select("select * from jestic_server WHERE SERVER_SIGN = #{serverId} AND SERVER_NAME = #{serverName}")
    JesticServer selectServer(@Param("serverId") String serverId, @Param("serverName") String serverName);

    List<JesticServer> selectByCondition(@Param("serverName") String serverName, @Param("env") String env, @Param("serverStatus") Integer serverStatus);
}
